<?php

include_once 'Expression.php';
include_once 'Statement.php';

/**
 * Represents a return value statement. 
 */

class MethodReturnStatement extends Statement
{
    public function __construct()
    {
        parent::__construct();
        $this->Expression = new Expression();
    }
    
    public function __set($name, $value)
    {
        parent::__set($name, $value);
        
        if($name == 'Expression')
        {
            $this->set_Expression($value);
        }
    }
    
    public function __get($name)
    {
        $ret = parent::__get($name);
        
        if($ret != null)
        {
            return $ret;
        }
        
        if($name == 'Expression')
        {
            return $this->get_Expression();
        }
    }
    
    public function get_Expression()
    {
        return $this->Expression;
    }

    public function set_Expression(Expression $Expression)
    {
        $this->Expression = $Expression;
    }

    private $Expression;
}

?>
